﻿using BCCommon;
using BCCommon.Enums;
using BCEntity.MongoDB.PushMessage;
using BCMongoEntity;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Kafka
{
    /// <summary>
    /// Kafka生产者
    /// </summary>
    [NonInjection]
    public interface IKafkaProducerService
    {
        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="entity">消息实体</param>
        /// <param name="kafkaTopic">topic名称</param>
        void Send<T>(T entity, string kafkaTopic) where T : MongoDBBaseEntity;

        /// <summary>
        /// 发送推送信息消息
        /// </summary>
        /// <param name="pushMessageMongoEntity">推送消息MongoDB信息</param>
        void SendPushMessage(PushMessageMongoEntity pushMessageMongoEntity);
    }
}
